<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <p></p>
    <p></p>
    <p></p>

    <script>

        // innerHTML 
        // innerText
        // value

        var oPs = document.querySelectorAll('p');
        // oPs 是一个伪数组
        // oPs[0].innerHTML = 666;
        // oPs[1].innerHTML = 666;
        // 循环赋值
        for (var i = 0; i < oPs.length; i++) {
            oPs[i].innerHTML = 666;
        }

    </script>

</body>

</html>